package cn.fzkj.gulimall.member.service;

import cn.fzkj.gulimall.member.vo.base.SocialUser;
import cn.fzkj.gulimall.member.exception.PhoneExistException;
import cn.fzkj.gulimall.member.exception.UsernameExistException;
import cn.fzkj.gulimall.member.vo.MemberLoginVo;
import cn.fzkj.gulimall.member.vo.MemberRegisterVo;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.fzkj.common.utils.PageUtils;
import cn.fzkj.gulimall.member.entity.MemberEntity;

import java.util.Map;

/**
 * 会员
 *
 * @author chenxin
 * @email chenxin@gmail.com
 * @date 2022-02-18 19:11:05
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    boolean register(MemberRegisterVo member);

    /** 检查手机号是否存在 */
    void checkPhoneUnique(String phone) throws PhoneExistException;

    /** 检查用户名是否存在 */
    void checkUsernameUnique(String username) throws UsernameExistException;

    MemberEntity login(MemberLoginVo vo);

    /** 第三方登陆 */
    MemberEntity login(SocialUser user);
}

